package jindu.zzh.gj.jinduriddle.riddle.utils;

import android.graphics.Typeface;
import android.support.annotation.NonNull;

import jindu.zzh.gj.jinduriddle.riddle.Myapplication;


/**
 * Created by reeman on 2017/12/15.
 */

public class TypeFaceUtil {
    /**
     * 获取字体
     * @param name 字体名字
     * @return typeface
     */
    public static Typeface getTypeface(@NonNull String name) {
        return Typeface.createFromAsset(Myapplication.getContext().getAssets(), "fonts/" + name);
    }
}
